<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>加载 Boot CDN 方式</title>
</head>
<body>
  <div id="app">
    <p>姓名：{{ state.name }}</p>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.1.5/vue.global.prod.min.js"></script>
  <script>
    //Vue 现在存在于window全局变量下，所以直接通过ES6解构出createAPP, ref, reactive
    const { createApp, reactive } = Vue;
    const App = {
      setup() {
        const state = reactive({
          name: '尼克陈'
        })
        return {
          state
        };
      }
    };
    //通过creatApp挂载实例到app节点下
    createApp(App).mount("#app");
  </script>
</body>
</html>